<template>
    <!--<product-card v-for="product in products" :key="product.id"></product-card>-->
    <div>
        <group-title>rows = 2</group-title>
        <grid :rows="2">
        <grid-item :label="product.subject" v-for="product in products" :key="product.id">
            <product-card :product-entry="product"></product-card>
            <img slot="icon" src="../assets/images/home.png">
        </grid-item>
        </grid>
    </div>
</template>
<script>
import { Grid, GridItem, GroupTitle } from 'vux'
import ProductCard from './ProductCard'

export default {
    name: 'ProductList',
    components: {
        Grid,
        GridItem,
        GroupTitle,
        ProductCard
    },
    data () {
        return {
            products: [
                {
                    id: 1,
                    subject: '手机1',
                    price: 100
                },
                {
                    id: 2,
                    subject: '手机2',
                    price: 200
                }
            ]
        }
    }
}
</script>
